import { useState, useEffect } from 'react';
import { findCinemas } from '@/api/MaiZuo';

export const useList = () => {
  const [list, setList] = useState([]);

  useEffect(() => {
    findCinemas().then((res) => {
      setList(res.cinemas);
    });
  }, []);
  return {
    list,
  };
};
